package Java0307;

import java.util.Scanner;

public class HuanGou {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("*************换购规则***************");
        System.out.println("1:购物超过50元，加1元换购500毫升可乐");
        System.out.println("2:购物超过100元，加2元换购1000毫升果汁");
        System.out.println("3:购物超过100元，加4元换购炫迈口香糖一瓶");
        System.out.println("4:购物超过200元，加38元换购一瓶进口红酒；");
        System.out.println("5:购物超过200元，加15元换购1袋面粉；");
        System.out.println("0:不换购");
        System.out.print("输入购物金额：");
        double money = sc.nextDouble();
        System.out.print("请输入选择：");
        int choose = sc.nextInt();
        switch (choose) {
            case 0: {
                System.out.println("不参与换购，实际支付金额为" + money + "元");
                break;
            }
            case 1: {
                if (money > 50) {
                    System.out.println("换购500毫升可乐一瓶，实际支付金额为" + (money + 1) + "元");
                } else {
                    System.out.println("不满足换购条件，实际支付金额为" + money + "元");
                }
                break;
            }
            case 2: {
                if (money > 100) {
                    System.out.println("1000毫升果汁一瓶，实际支付金额为" + (money + 2) + "元");
                } else {
                    System.out.println("不满足换购条件，实际支付金额为" + money + "元");
                }
                break;
            }
            case 3: {
                if (money > 100) {
                    System.out.println("炫迈口香糖，实际支付金额为" + (money + 4) + "元");
                } else {
                    System.out.println("不满足换购条件，实际支付金额为" + money + "元");
                }
                break;
            }
            case 4: {
                if (money > 200) {
                    System.out.println("进口红酒一瓶，实际支付金额为" + (money + 38) + "元");
                } else {
                    System.out.println("不满足换购条件，实际支付金额为" + money + "元");
                }
                break;
            }
            case 5: {
                if (money > 200) {
                    System.out.println("面粉一袋，实际支付金额为" + (money + 15) + "元");
                } else {
                    System.out.println("不满足换购条件，实际支付金额为" + money + "元");
                }
                break;
            }
            default: {
                break;
            }
        }
    }
}
